import class from '@vue/cli-service';
<template>
  <div>
    <el-tooltip class="item" effect="dark" content="i18n" placement="bottom">
      <el-dropdown trigger="click" @command="handleCommand">
        <span class="el-dropdown-link">
          <svg-icon icon-class="language" /><i class="el-icon-arrow-down el-icon--right" />
        </span>
        <el-dropdown-menu slot="dropdown">
          <el-dropdown-item command="zh">中文</el-dropdown-item>
          <el-dropdown-item command="en">英文</el-dropdown-item>
          <el-dropdown-item command="ja">日语</el-dropdown-item>
        </el-dropdown-menu>
      </el-dropdown>
    </el-tooltip>

  </div>
</template>

<script>
export default {
  name: '',
  methods: {
    handleCommand(command) {
      this.$i18n.locale = command
      console.log(this.$i18n.locale, 123)
    }
  }
}

</script>
<style lang='less' scoped>

</style>
